<div class="wrapper wrapper-content animated fadeInRight ecommerce">
    <div class="row">
        <div class="col-md-1 padding-r-0">
            <div class=" border-radius ">
                <div class="margin-xs-r  treeview attendance-staff">
                    <ul class="list-group text-center border-radius">
                        <li class="list-group-item node-orgTree " v-for="(item,index) in itemOutManageInfo.states"
                            :key="index" @click="swatchState(item)"
                            :class="{'vc-node-selected':itemOutManageInfo.conditions.state == item.statusCd}">
                            {{item.name}}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="col-md-11">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox ">
                        <div class="ibox-title">
                            <h5>
                                <vc:i18n name="查询条件" namespace="itemOutManage"></vc:i18n>
                            </h5>
                            <div class="ibox-tools" style="top:10px;"></div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请输入单号','itemOutManage')"
                                               v-model.trim="itemOutManageInfo.conditions.applyOrderId"
                                               class=" form-control">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请填写申请人姓名','itemOutManage')"
                                               v-model.trim="itemOutManageInfo.conditions.applyUserName"
                                               class=" form-control">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <input type="text" :placeholder="vc.i18n('请填写物品名称','itemOutManage')"
                                               class="form-control" v-model.trim="itemOutManageInfo.conditions.resName">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group input-group">
                                        <input type="text" :placeholder="vc.i18n('请选择开始时间','itemOutManage')"
                                               v-model.trim="itemOutManageInfo.conditions.startTime"
                                               class=" form-control startTime">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="form-group input-group">
                                        <input type="text" :placeholder="vc.i18n('请选择结束时间','itemOutManage')"
                                               v-model.trim="itemOutManageInfo.conditions.endTime"
                                               class=" form-control endTime">
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <button type="button" class="btn btn-primary btn-sm"
                                            v-on:click="_queryInspectionPlanMethod()">
                                        <i class="fa fa-search"></i>
                                        <span><vc:i18n name="查询" namespace="itemOutManage"></vc:i18n></span>
                                    </button>
                                    <button type="button" class="btn btn-primary btn-sm"
                                            v-on:click="_resetInspectionPlanMethod()">
                                        <i class="fa fa-repeat"></i>
                                        <span><vc:i18n name="重置" namespace="itemOutManage"></vc:i18n></span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox">
                        <div class="ibox-title">
                            <h5>
                                <vc:i18n name="物品领用" namespace="itemOutManage"></vc:i18n>
                            </h5>
                            <div class="ibox-tools" style="top:10px;">
                                <button type="button" class="btn btn-primary btn-sm"
                                        v-on:click="_openAddItemOutModal()">
                                    <i class="fa fa-plus"></i>
                                    <vc:i18n name="领用申请" namespace="itemOutManage"></vc:i18n>
                                </button>
                                <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportExcel()">
                                    <i class="fa fa-download"></i>
                                    <vc:i18n name="导出" namespace="itemOutManage"></vc:i18n>
                                </button>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                                <thead>
                                <tr>
                                    <th class="text-center">
                                        <vc:i18n name="单号" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="物品" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="申请人" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="操作人" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="申请时间" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="状态" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="领用方式" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                    <th class="text-center">
                                        <vc:i18n name="操作" namespace="itemOutManage"></vc:i18n>
                                    </th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="itemOut in itemOutManageInfo.itemOuts">
                                    <td class="text-center">{{itemOut.applyOrderId}}</td>
                                    <td class="text-center">{{itemOut.resourceNames}}</td>
                                    <td class="text-center">{{itemOut.userName}}</td>
                                    <td class="text-center">{{itemOut.createUserName}}</td>
                                    <td class="text-center">{{itemOut.createTime}}</td>
                                    <td class="text-center">{{itemOut.stateName}}</td>
                                    <td class="text-center">{{itemOut.warehousingWay == 10000 ? '直接出库' : '审核出库'}}</td>
                                    <td class="text-center">
                                        <div class="btn-group">
                                            <button class="btn-white btn btn-xs"
                                                    v-on:click="_openDetailItemOutModel(itemOut)">
                                                <vc:i18n name="查看" namespace="itemOutManage"></vc:i18n>
                                            </button>
                                        </div>
                                        <div class="btn-group" v-if="itemOut.warehousingWay != 10000">
                                            <button class="btn-white btn btn-xs"
                                                    v-on:click="_openRunWorkflowImage(itemOut)">
                                                <vc:i18n name="流程图" namespace="itemOutManage"></vc:i18n>
                                            </button>
                                        </div>
                                        <div class="btn-group"
                                             v-if="itemOut.state == '1000' && itemOutManageInfo.currentUserId == itemOut.createUserId">
                                            <button class="btn-white btn btn-xs"
                                                    v-on:click="_openDeleteItemOutModel(itemOut)">
                                                <vc:i18n name="取消领用" namespace="itemOutManage"></vc:i18n>
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="9">
                                        <ul class="pagination float-right"></ul>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                            <!-- 分页 -->
                            <div class="row margin-top-xs">
                                <div class="col-sm-9">
                                    <div></div>
                                </div>
                                <div class="col-sm-3 float-right">
                                    <vc:create path="frame/pagination"></vc:create>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <vc:create path="common/deleteItemOut"></vc:create>
    <vc:create path="common/viewImage"></vc:create>
</div>